libxl: improve error handling when saving device model state.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 20 Dec 2011 18:14:53 +0000 (18:14 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 20 Dec 2011 18:14:53 +0000 (18:14 +0000)
commit4df7055e7774b8118a3c97153834dae619e12c13
tree1d1920b56435d874886bd4d76df3f7f952a5fe17
parent5b4f1759a0a78efe70f349e15b1d4ce876ec1e1b
libxl: improve error handling when saving device model state.

Do not leak a file descriptor (fd2 when used with upstream qemu) or a file (the
save file which is leaked on failure).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dom.c